<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Simulateur du jeu d&#39;instructions d&#39;un processeur simple: Référence du fichier Examples/prog_subroutine.c</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Généré par Doxygen 1.7.4 -->
<script type="text/javascript">
function hasClass(ele,cls) {
  return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)'));
}

function addClass(ele,cls) {
  if (!this.hasClass(ele,cls)) ele.className += " "+cls;
}

function removeClass(ele,cls) {
  if (hasClass(ele,cls)) {
    var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)');
    ele.className=ele.className.replace(reg,' ');
  }
}

function toggleVisibility(linkObj) {
 var base = linkObj.getAttribute('id');
 var summary = document.getElementById(base + '-summary');
 var content = document.getElementById(base + '-content');
 var trigger = document.getElementById(base + '-trigger');
 if ( hasClass(linkObj,'closed') ) {
   summary.style.display = 'none';
   content.style.display = 'block';
   trigger.src = 'open.png';
   removeClass(linkObj,'closed');
   addClass(linkObj,'opened');
 } else if ( hasClass(linkObj,'opened') ) {
   summary.style.display = 'block';
   content.style.display = 'none';
   trigger.src = 'closed.png';
   removeClass(linkObj,'opened');
   addClass(linkObj,'closed');
 }
 return false;
}
</script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Simulateur du jeu d'instructions d'un processeur simple</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="annotated.html"><span>Structures&#160;de&#160;données</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
      <li><a href="dirs.html"><span>Répertoires</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Liste&#160;des&#160;fichiers</span></a></li>
      <li><a href="globals.html"><span>Portée&#160;globale</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('prog__subroutine_8c.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">Référence du fichier prog_subroutine.c</div>  </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="machine_8h_source.html">machine.h</a>&quot;</code><br/>
</div><div class="textblock"><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png"/> Graphe des dépendances par inclusion de prog_subroutine.c:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="prog__subroutine_8c__incl.png" border="0" usemap="#Examples_2prog__subroutine_8c" alt=""/></div>
<map name="Examples_2prog__subroutine_8c" id="Examples_2prog__subroutine_8c">
<area shape="rect" id="node3" href="machine_8h.html" title="Description de la structure du processeur et de sa mémoire." alt="" coords="65,83,156,112"/><area shape="rect" id="node7" href="instruction_8h.html" title="Description du jeu d&#39;instruction." alt="" coords="103,160,209,189"/></map>
</div>
</div>
<p><a href="prog__subroutine_8c_source.html">Aller au code source de ce fichier.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="unionInstruction.html">Instruction</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prog__subroutine_8c.html#a53ae7c86b11d9a664628491ba41ca09d">text</a> []</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Second exemple de segment de texte.  <a href="#a53ae7c86b11d9a664628491ba41ca09d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prog__subroutine_8c.html#ab06365569505a01a31c5b0da6227d724">textsize</a> = sizeof(<a class="el" href="test__simul_8c.html#a53ae7c86b11d9a664628491ba41ca09d">text</a>) / sizeof(<a class="el" href="unionInstruction.html">Instruction</a>)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Taille utile du programme.  <a href="#ab06365569505a01a31c5b0da6227d724"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="instruction_8h.html#a0b5b15ce5f3a75b5dd0de6643cd3d958">Word</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prog__subroutine_8c.html#a5373e8edb39eef8de190ed6dcdcc7338">data</a> [20]</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Premier exemple de segment de données initial.  <a href="#a5373e8edb39eef8de190ed6dcdcc7338"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prog__subroutine_8c.html#ad74734ae58f284f6cc955dfecf50f0d0">dataend</a> = 10</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Fin de la zone de données utile.  <a href="#ad74734ae58f284f6cc955dfecf50f0d0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="prog__subroutine_8c.html#aaf62fcfcec5bdcaf147f70c32398ab32">datasize</a> = sizeof(<a class="el" href="test__simul_8c.html#a0a1a7765b8d407ad9c19649d5a9dd699">data</a>) / sizeof(<a class="el" href="instruction_8h.html#a0b5b15ce5f3a75b5dd0de6643cd3d958">Word</a>)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Taille utile du segment de données.  <a href="#aaf62fcfcec5bdcaf147f70c32398ab32"></a><br/></td></tr>
</table>
<hr/><h2>Documentation des variables</h2>
<a class="anchor" id="a5373e8edb39eef8de190ed6dcdcc7338"></a><!-- doxytag: member="prog_subroutine.c::data" ref="a5373e8edb39eef8de190ed6dcdcc7338" args="[20]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="instruction_8h.html#a0b5b15ce5f3a75b5dd0de6643cd3d958">Word</a> <a class="el" href="test__simul_8c.html#a0a1a7765b8d407ad9c19649d5a9dd699">data</a>[20]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Valeur initiale :</b><div class="fragment"><pre class="fragment"> {
    0,  
    0,  
    20, 
    5,  
}
</pre></div>
<p>Premier exemple de segment de données initial. </p>

<p>Définition à la ligne <a class="el" href="prog__subroutine_8c_source.html#l00036">36</a> du fichier <a class="el" href="prog__subroutine_8c_source.html">prog_subroutine.c</a>.</p>

</div>
</div>
<a class="anchor" id="ad74734ae58f284f6cc955dfecf50f0d0"></a><!-- doxytag: member="prog_subroutine.c::dataend" ref="ad74734ae58f284f6cc955dfecf50f0d0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const unsigned <a class="el" href="test__simul_8c.html#ad74734ae58f284f6cc955dfecf50f0d0">dataend</a> = 10</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Fin de la zone de données utile. </p>

<p>Définition à la ligne <a class="el" href="prog__subroutine_8c_source.html#l00044">44</a> du fichier <a class="el" href="prog__subroutine_8c_source.html">prog_subroutine.c</a>.</p>

</div>
</div>
<a class="anchor" id="aaf62fcfcec5bdcaf147f70c32398ab32"></a><!-- doxytag: member="prog_subroutine.c::datasize" ref="aaf62fcfcec5bdcaf147f70c32398ab32" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const unsigned <a class="el" href="test__simul_8c.html#aaf62fcfcec5bdcaf147f70c32398ab32">datasize</a> = sizeof(<a class="el" href="test__simul_8c.html#a0a1a7765b8d407ad9c19649d5a9dd699">data</a>) / sizeof(<a class="el" href="instruction_8h.html#a0b5b15ce5f3a75b5dd0de6643cd3d958">Word</a>)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Taille utile du segment de données. </p>

<p>Définition à la ligne <a class="el" href="prog__subroutine_8c_source.html#l00047">47</a> du fichier <a class="el" href="prog__subroutine_8c_source.html">prog_subroutine.c</a>.</p>

</div>
</div>
<a class="anchor" id="a53ae7c86b11d9a664628491ba41ca09d"></a><!-- doxytag: member="prog_subroutine.c::text" ref="a53ae7c86b11d9a664628491ba41ca09d" args="[]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="unionInstruction.html">Instruction</a> <a class="el" href="test__simul_8c.html#a53ae7c86b11d9a664628491ba41ca09d">text</a>[]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Valeur initiale :</b><div class="fragment"><pre class="fragment"> {


    {.instr_absolute =  {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6ad263caec619c4d99e4684ba0fabd9493" title="Empilement sur la pile d&#39;exécution.">PUSH</a>,   <span class="keyword">false</span>, <span class="keyword">false</span>,  0,  2   }},  
    {.instr_absolute =  {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6ad263caec619c4d99e4684ba0fabd9493" title="Empilement sur la pile d&#39;exécution.">PUSH</a>,   <span class="keyword">false</span>, <span class="keyword">false</span>,  0,  3   }},  
    {.instr_absolute =  {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6abd0ebc08c262bab82a1882256d2d66e8" title="Appel de sous-programme.">CALL</a>,   <span class="keyword">false</span>, <span class="keyword">false</span>,  <a class="code" href="instruction_8h.html#ab6d907c41d48048e1eb203e15f2fc9a8a3dbd1016ea99d087d747530418b89a01" title="Pas de condition (nrachement inconditionnel)">NC</a>,     10  }},  
    {.instr_immediate = {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6acfcf145f2788bf340ff3f3098bc54909" title="Addition à un registre.">ADD</a>,    <span class="keyword">true</span>,  <span class="keyword">false</span>,  15,     2   }},  
    {.instr_absolute =  {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6afeb01cb4572ba190cd7932e49446c480" title="Rangement du contenu d&#39;un registre.">STORE</a>,  <span class="keyword">false</span>, <span class="keyword">false</span>,  0,  1   }},  
    {.instr_generic =   {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6aa2fd6bbb0c07e28e835ba595e64df78c" title="Arrêt (normal) du programme.">HALT</a>,                  }},  
    {.instr_generic =   {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6af811bef354b292ff0713c50d7652c026" title="Instruction sans effet.">NOP</a>,                   }},  
    {.instr_generic =   {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6af811bef354b292ff0713c50d7652c026" title="Instruction sans effet.">NOP</a>,                   }},  
    {.instr_generic =   {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6af811bef354b292ff0713c50d7652c026" title="Instruction sans effet.">NOP</a>,                   }},  
    {.instr_generic =   {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6af811bef354b292ff0713c50d7652c026" title="Instruction sans effet.">NOP</a>,                   }},  
    {.instr_indexed =   {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6a972dbcdf74cff71e20bdcfb53be9c391" title="Chargement d&#39;un registre.">LOAD</a>,   <span class="keyword">false</span>, <span class="keyword">true</span>,   0,  15, +3  }},  
    {.instr_indexed =   {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6a972dbcdf74cff71e20bdcfb53be9c391" title="Chargement d&#39;un registre.">LOAD</a>,   <span class="keyword">false</span>, <span class="keyword">true</span>,   1,  15, +2  }},  
    {.instr_immediate = {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6a12b733d4941495e86811fe6ceeeff9da" title="Soustraction d&#39;un registre.">SUB</a>,    <span class="keyword">true</span>,  <span class="keyword">false</span>,  1,  1   }},  
    {.instr_absolute =  {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6ad9b20a9207fb2cd3021b9eb0b7c6fe5e" title="Branchement conditionnel ou non.">BRANCH</a>, <span class="keyword">false</span>, <span class="keyword">false</span>,  <a class="code" href="instruction_8h.html#ab6d907c41d48048e1eb203e15f2fc9a8a662ed4b51721a45f07d645d4ca099a61" title="Négatif ou null.">LE</a>,     17  }},  
    {.instr_indexed =   {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6acfcf145f2788bf340ff3f3098bc54909" title="Addition à un registre.">ADD</a>,    <span class="keyword">false</span>, <span class="keyword">true</span>,   0,  15, +3  }},  
    {.instr_immediate = {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6a12b733d4941495e86811fe6ceeeff9da" title="Soustraction d&#39;un registre.">SUB</a>,    <span class="keyword">true</span>,  <span class="keyword">false</span>,  1,  1   }},  
    {.instr_absolute =  {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6ad9b20a9207fb2cd3021b9eb0b7c6fe5e" title="Branchement conditionnel ou non.">BRANCH</a>, <span class="keyword">false</span>, <span class="keyword">false</span>,  <a class="code" href="instruction_8h.html#ab6d907c41d48048e1eb203e15f2fc9a8a3dbd1016ea99d087d747530418b89a01" title="Pas de condition (nrachement inconditionnel)">NC</a>,     13  }},  
    {.instr_generic =   {<a class="code" href="instruction_8h.html#a5ead9d7413d75b14e895c945daa82de6ab2510768eaba5e52ba71678e19a65464" title="Retour de sous-programme.">RET</a>,                   }},  
}
</pre></div>
<p>Second exemple de segment de texte. </p>
<p>Segment de texte.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>On voit ici l'intérêt de l'initialisation d'une union avec nommage explicite des champs. </dd></dl>

<p>Définition à la ligne <a class="el" href="prog__subroutine_8c_source.html#l00009">9</a> du fichier <a class="el" href="prog__subroutine_8c_source.html">prog_subroutine.c</a>.</p>

</div>
</div>
<a class="anchor" id="ab06365569505a01a31c5b0da6227d724"></a><!-- doxytag: member="prog_subroutine.c::textsize" ref="ab06365569505a01a31c5b0da6227d724" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const unsigned <a class="el" href="test__simul_8c.html#ab06365569505a01a31c5b0da6227d724">textsize</a> = sizeof(<a class="el" href="test__simul_8c.html#a53ae7c86b11d9a664628491ba41ca09d">text</a>) / sizeof(<a class="el" href="unionInstruction.html">Instruction</a>)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Taille utile du programme. </p>

<p>Définition à la ligne <a class="el" href="prog__subroutine_8c_source.html#l00033">33</a> du fichier <a class="el" href="prog__subroutine_8c_source.html">prog_subroutine.c</a>.</p>

</div>
</div>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="prog__subroutine_8c.html">prog_subroutine.c</a>      </li>
      <li class="footer">Généré le Tue May 31 2011 11:25:41 pour Simulateur du jeu d'instructions d'un processeur simple par&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </li>
    </ul>
  </div>

</body>
</html>
